﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Category>" %>

<fieldset>
<% using (Html.BeginForm("EditCategory", "Admin", FormMethod.Post, new { @class = "standardform" }))
{ %>
<table>
    <tr>
        <td style="width: 150px;">Parent</td>
        <td style="width: 300px;"><%= Html.DropDownList("categoryparent", UIHelper.GetCategoriesAsItemList(Model.Parent == null ? "0" : Model.Parent.Id.ToString()), new { @class = "fullwidth" }) %></td>
        <td class="hint"></td>
    </tr>
    <tr>
        <td colspan="3" style="height: 15px;"></td>
    </tr>
    <tr>
        <td style="width: 150px;">Name</td>
        <td style="width: 300px;"><%= Html.TextBox("categoryname", Model.Name, new { @class = "fullwidth" }) %></td>
        <td class="hint"></td>
    </tr>    
    <tr>
        <td>Description</td>
        <td><%= Html.TextBox("categorydescription", Model.Description, new { @class = "fullwidth" }) %></td>
        <td class="hint"></td>
    </tr>
    <tr>
        <td>Icon URL</td>
        <td><%= Html.TextBox("categoryiconurl", Model.IconUrl, new { @class = "fullwidth" }) %></td>
        <td class="hint"></td>
    </tr>
    <tr>
        <td colspan="3" style="height: 15px;"></td>
    </tr>
    <tr>
        <td>Meta Fields</td>
        
        <td colspan="2">
            
        </td>
    </tr>
    <tr>
        <td colspan="3" style="text-align: right;">
            <input type="submit" value="Save" />
        </td>
    </tr>
</table>
<%
}
%>
</fieldset>